#-*- coding:gbk -*-
'''
Created on 2012-8-6

@author: xxy
'''
import world_object
import world_message

class NPC(world_object.WorldObject):
    def __init__(self, position, name):
        world_object.WorldObject.__init__(self,  name)
        self.setPosition(position)
        
    def process(self, **argv):
        pass
            
    def toDict(self):
        npc_attr_dict = {}
        npc_attr_dict[world_message.MessageAttr.NAME] = self.m_name
        npc_attr_dict[world_message.MessageAttr.UNIT_ID] = self.m_guid
        npc_attr_dict[world_message.MessageAttr.ROLE] = world_message.Role.NPC
        npc_attr_dict[world_message.MessageAttr.POSITION] = self.m_position

        return npc_attr_dict